<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    // Object.create(proto)    创建一个对象,并指定该对象的原型属性指向

    // (1) 如果参数为null  => 创建一个纯净的空对象 {}
    var result = Object.create(null);
    console.log(result);

    // (2) 如果有参数 且不为null

    var result = Object.create(Array.prototype);
    console.log(result);

    // 等价于
    // var obj = {};
    // Object.setPrototypeOf(obj, Array.prototype);
    // console.log(obj);



</script>

</html>